package com.xw.service;

import com.xw.mapper.Mymapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class Myserviceclmpl implements Myservicec {

    @Autowired
    private Mymapper mymapper;

    @Override
    public Object find666(String id) {
        String findstu = mymapper.findstu(id);
        HashMap data = new HashMap();

        if (findstu==null) {
            data.put("code", 404);
            data.put("msg", "不存在该用户");
            return data;
        } else {

            data.put("code", 200);
            data.put("msg", "你已成功访问数据！");
            data.put("data", findstu);
            return data;
        }

    }
}
